/*
 * IBM Corporation.
 * Copyright (c) 2014 All Rights Reserved.
 */

package com.ibm.iisp.dataie.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import com.ibm.iisp.common.vo.RefBean;

/**
 * 类作用：定义导入导出数据的表
 * 
 * @author Johnny@cn.ibm.com 使用说明：
 */
@Entity
@Table(name = "IISP_DATA_IE_TABLE")
@NamedQueries({
	@NamedQuery(name = DataIETable.QUERY_ALL, query = "select dt from DataIETable dt order by dt.groupName, dt.seq")
})
public class DataIETable extends RefBean {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8812212358266169348L;

	public final static String QUERY_ALL = "DataIETable.QUERY_ALL";
	/**
	 * 分组名; 对补录表列表分组，便于阅读
	 */
	private String groupName;

	private String autoIdColumn;
	/**
	 * 用于识别是否相同记录的字段
	 */
	private String keyColumns;
	/**
	 * 导出时必需导出的字段
	 */
	private String requiredCoumns;
	/**
	 * 缺省的过滤条件; 如：DATA_DATE='${currentDateDate}' AND NODE_CODE = '${currentNodeCode}' AND PACKAGE_CODE = '${currentPackageCode}'
	 * 
	 */
	private String defaultFilter;
	/**
	 * 增量过滤条件,如 ASSET_CP_CODE is not NULL
	 */
	private String incOnlyFilter;
	/**
	 * 排序条件
	 */
	private String orderBy;
	/**
	 * 分行数据过滤条件; 如：NODE_CODE = '${currentNodeCode}'
	 */
	private String nodeDataFilter;

	/**
	 * 导出前要执行的过程; 格式proc_name('${col_name}')
	 */
	private String expProcedure;

	private String validProcedure;

	/**
	 * 导入后要执行的过程; 格式proc_name('${col_name}'),其中，col_name是导入表的某个列名，如：data_date
	 */
	private String impProcedure;

	/**
	 * 缺省是否只导出增量数据
	 */
	@Column(name = "IS_EXP_INC_ONLY")
	private Boolean isExportIncOnly;

	private String seq;
	public String getKeyColumns() {
		return keyColumns;
	}

	public void setKeyColumns(String keyColumns) {
		this.keyColumns = keyColumns;
	}

	public String getRequiredCoumns() {
		return requiredCoumns;
	}

	public void setRequiredCoumns(String requiredCoumns) {
		this.requiredCoumns = requiredCoumns;
	}

	public String getDefaultFilter() {
		return defaultFilter;
	}

	public void setDefaultFilter(String defaultFilter) {
		this.defaultFilter = defaultFilter;
	}

	public String getNodeDataFilter() {
		return nodeDataFilter;
	}

	public void setNodeDataFilter(String nodeDataFilter) {
		this.nodeDataFilter = nodeDataFilter;
	}

	public String getExpProcedure() {
		return expProcedure;
	}

	public void setExpProcedure(String expProcedure) {
		this.expProcedure = expProcedure;
	}

	public String getImpProcedure() {
		return impProcedure;
	}

	public void setImpProcedure(String impProcedure) {
		this.impProcedure = impProcedure;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public String getAutoIdColumn() {
		return autoIdColumn;
	}

	public void setAutoIdColumn(String autoIdColumn) {
		this.autoIdColumn = autoIdColumn;
	}

	public Boolean getIsExportIncOnly() {
		return isExportIncOnly;
	}

	public void setIsExportIncOnly(Boolean isExportIncOnly) {
		this.isExportIncOnly = isExportIncOnly;
	}

	public String getSeq() {
		return seq;
	}

	public void setSeq(String seq) {
		this.seq = seq;
	}

	public String getOrderBy() {
		return orderBy;
	}

	public void setOrderBy(String orderBy) {
		this.orderBy = orderBy;
	}

	public String getValidProcedure() {
		return validProcedure;
	}

	public void setValidProcedure(String validProcedure) {
		this.validProcedure = validProcedure;
	}

	public String getIncOnlyFilter() {
		return incOnlyFilter;
	}

	public void setIncOnlyFilter(String incOnlyFilter) {
		this.incOnlyFilter = incOnlyFilter;
	}

}
